<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ic="http://ivyteam.ch/jsf/component"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:pm="http://primefaces.org/mobile">
 
    <h:head>
        <title>JSF User Dialog</title>
    </h:head>
    <h:body>
        <h3>This is a JSF view.</h3>
        <h:form id="myForm">
        <p:outputPanel id="myComp">
        	<p:outputLabel value="#{data.message}"></p:outputLabel>
           <p:inputText id="txtUser" value="#{data.username}" required="true" requiredMessage="this field is required"></p:inputText>
           
           <p:message for="txtUser"></p:message>
           <p:password id="txtPassword" value="#{data.password}" required="true" requiredMessage="this field is required"></p:password>
           <p:message for="txtPassword"></p:message>
         </p:outputPanel>
         <ic:ch.ivyteam.demo.example.ExampleComponent></ic:ch.ivyteam.demo.example.ExampleComponent>
            <p:commandButton value="#{ivy.cms.co('/ch/ivyteam/btnSubmit')}" actionListener="#{logic.onSubmit}"  update=":#{p:component('demoDlg')}, myComp"></p:commandButton>
            <p:graphicImage library="ivy-cms" name="/ch/ivyteam/logo" ></p:graphicImage>
        </h:form> 
        
        <p:dialog id="demoDlg" header="Demo dialog" width="500" height="auto" widgetVar="demodialogVar" >
        	<p:outputLabel  value="#{data.username}"></p:outputLabel>
        </p:dialog>   	
    </h:body>
</html>